#include <iostream>
using namespace std;

/**
 * 运算符重载：：一元运算符重载
*/

class Test{
    public:
        int num = 10;

        void operator-(){
            num = -num;
        };
};

int main(){
    Test t;
    -t;

    // t.num:-10
    cout << "t.num:" << t.num << endl;
}